Socket
Socket
Sign inDemoInstall

split-on-first

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

split-on-first

Split a string on the first occurance of a given separator


Version published
Weekly downloads
6.1M
decreased by-0.81%
Maintainers
1
Weekly downloads
 
Created

What is split-on-first?

The split-on-first npm package is a simple utility that allows you to split a string on the first occurrence of a specified separator. This is particularly useful when you need to parse strings where only the first separator is significant and subsequent separators are part of the remaining substring.

What are split-on-first's main functionalities?

Splitting a string on the first occurrence of a separator

This function splits the string 'a,b,c,d' on the first comma. The result is an array with two elements: the substring before the first comma ('a') and the substring after the first comma ('b,c,d').

"a,b,c,d".splitOnFirst(',')

Other packages similar to split-on-first

Keywords

FAQs

Package last updated on 15 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc